<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>首页</title>
<jsp:directive.include file="/WEB-INF/decorators/taglibs.jsp"/>
<script>
var tab, menu;
$(function() {
	$("#content").ligerLayout({leftWidth: 190, height: "100%", heightDiff: -20, space: 4, onHeightChanged: sys_heightChanged});
	var height = $(".l-layout-center").height();
	$("#menu").ligerAccordion({height: height-24, speed:null});
	$(".l-link").hover(function() {
		$(this).addClass("l-link-over");
	}, function() {
		$(this).removeClass("l-link-over");
	});
	$("#framecenter").ligerTab({height: height, dblClickToClose: true});
	$("#pageloading").hide();
	tab = $("#framecenter").ligerGetTabManager();
	menu = $("#menu").ligerGetAccordionManager();
});
function sys_heightChanged(options) {
	if (tab) 
		tab.addHeight(options.diff);
	if (menu && options.middleHeight-24 > 0)
		menu.setHeight(options.middleHeight - 24);
}
function sys_addTab(tabId, text, url) {
	tab.addTabItem({tabid: tabId, text: text, url: url});
}
</script>
<style type="text/css">
body,html{height:100%;}
body{padding:0px; margin:0; overflow:hidden;}
.l-link{ display:block; height:26px; line-height:26px; padding-left:10px; text-decoration:underline; color:#333;}
.l-link{ display:block; line-height:22px; height:22px; padding-left:16px;border:1px solid white; margin:4px;}
.l-link-over{ background:#FFEEAC; border:1px solid #DB9F00;}
#pageloading{position:absolute; left:0px; top:0px; background:white url('loading.gif') no-repeat center; width:100%; height:100%;z-index:99999;}
.header {margin:0; padding:0; height:31px; line-height:31px; background:url('lib/images/top.jpg') repeat-x bottom;  position:relative; border-top:1px solid #1D438B;}
.l_header_left {padding-left:35px; line-height:26px;background:url('lib/images/topicon.gif') no-repeat 10px 5px;}
.l_header_right {position: absolute; right: 30px; top: 2px; height: 24px; line-height: 24px;}
</style>
</head>
<body>
<div id="pageloading"></div>
<div id="header" position="header" class="header">
	<div class="l_header_left">测试一下</div>
	<div class="l_header_right"><a href="<%=request.getContextPath() %>/j_spring_security_logout">注销</a></div>
</div>
<div id="content">
	<div position="left" title="菜单" id="menu">
		<div title="系统设置" class="l-scroll">
			<a class="l-link" href="javascript:sys_addTab('userList','用户列表','/pineapple/user/load')">用户列表</a>
			<a class="l-link" href="demos/dialog/win7.htm" target="_blank">模拟Window桌面</a>
		</div>
		<div title="功能列表">
			<ul id="tree1" style="margin-top:3px;"></ul>
		</div>
	</div>
	<div position="center" id="framecenter">
		<div tabid="home" title="我的主页" style="height:300px" >
			<iframe frameborder="0" name="home" id="home" src="welcome"></iframe>
		</div>
	</div>
</div>
<div id="footer" position="footer" style="height:20px;text-align:center">Copyright &copy 2012</div>
</body>
</html>